package br.com.sgac.remote{

	
	import br.com.sgac.objetos.Medico;
	
	import mx.rpc.AsyncToken;
	import mx.rpc.Responder;

	public class remoteMedico extends Remote{
		public function remoteMedico()		{
			getInstance();
		}
		public function inserirMedico(result:Function,medico:Medico,source:String):void{
			_remote.source = source;
			var async:AsyncToken = _remote.inserirMedico(medico);
			async.addResponder(new Responder(result,defaultFaultHandler));
			
		}
		public function listarTodosMedico(result:Function,source:String):void{
			_remote.source = source;
			var async:AsyncToken = _remote.listarTodosMedicos();
			async.addResponder(new Responder(result,defaultFaultHandler));
			
		}
		public function listarMedicos(result:Function,nomeMedico:String,source:String):void{
			_remote.source = source;
			var async:AsyncToken = _remote.listarMedicos(nomeMedico);
			async.addResponder(new Responder(result,defaultFaultHandler));
			
		}
	}
}